<template>
 <div class="container">
    <div class="box">
      <header class="header">头部</header>
      <div class="content">内容</div>
    </div>
    <footer class="footer">
      <ul>
        <li>
          <span></span>
          <p>首页</p>
        </li>
        <li>
          <span></span>
          <p>分类</p>
        </li>
        <li>
          <span></span>
          <p>购物车</p>
        </li>
        <li>
          <span></span>
          <p>我的</p>
        </li>
      </ul>
    </footer>
 </div>
</template>
<style lang="scss">
*{
  margin: 0;
  padding: 0;
  list-style: none;
}
html,body,#app,
.container
{
  width: 100%;
  height: 100%;
}
.container{
  display: flex;
  flex-direction: column;
  background: #efefef;
  .box{
    flex: 1;
    // 铺满剩下的整个屏幕
    overflow: auto;
    display: flex;
    flex-direction: column;
    .header{
      height: 50px;
    }
    .content{
      flex: 1;
      overflow: auto;
    }
  }
  .footer{
    height: 50px;
    background: red;
    ul{
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: space-evenly;
      align-items: center;
    }
  }
}
</style>
